package com.qf.service.impl;

import com.qf.pojo.PayType;
import com.qf.pojo.resp.BaseResult;
import com.qf.repository.PayTypeRepository;
import com.qf.service.PayTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PayTypeServiceImpl implements PayTypeService {

    @Autowired
    PayTypeRepository payTypeRepository;
    @Override
    public BaseResult findAll() {
        BaseResult baseResult = new BaseResult();
        List<PayType> payTypes = payTypeRepository.findAll();
        baseResult.setCode(1);
        baseResult.setData(payTypes);
        return baseResult;
    }
}
